package com.xrc;

import java.util.Scanner;

public class Exercise {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int number=sc.nextInt();
        int x=number;
        int sum=0;
     /*   while (number>0){
            sum+=number%10;
            number=number/10;
        }
        System.out.println(sum);*/
        //逆序输出一个整数
        int p=0;
        while (x>0){
            p=p*10+x%10;
            x/=10;

        }
        System.out.println(p);
    }
}
